/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "TIPO_TARJETA", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "TipoTarjeta.findAll", query = "SELECT t FROM TipoTarjeta t"), @NamedQuery(name = "TipoTarjeta.findByIdTipotarjeta", query = "SELECT t FROM TipoTarjeta t WHERE t.idTipotarjeta = :idTipotarjeta"), @NamedQuery(name = "TipoTarjeta.findByNombreTipotarjeta", query = "SELECT t FROM TipoTarjeta t WHERE t.nombreTipotarjeta = :nombreTipotarjeta"), @NamedQuery(name = "TipoTarjeta.findByCupomax", query = "SELECT t FROM TipoTarjeta t WHERE t.cupomax = :cupomax"), @NamedQuery(name = "TipoTarjeta.findByCupomin", query = "SELECT t FROM TipoTarjeta t WHERE t.cupomin = :cupomin"), @NamedQuery(name = "TipoTarjeta.findByActivo", query = "SELECT t FROM TipoTarjeta t WHERE t.activo = :activo")})
public class TipoTarjeta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TIPOTARJETA", nullable = false, precision = 22)
    private BigDecimal idTipotarjeta;
    @Basic(optional = false)
    @Column(name = "NOMBRE_TIPOTARJETA", nullable = false, length = 50)
    private String nombreTipotarjeta;
    @Basic(optional = false)
    @Column(name = "CUPOMAX", nullable = false)
    private double cupomax;
    @Basic(optional = false)
    @Column(name = "CUPOMIN", nullable = false)
    private double cupomin;
    @Basic(optional = false)
    @Column(name = "ACTIVO", nullable = false)
    private char activo;

    public TipoTarjeta() {
    }

    public TipoTarjeta(BigDecimal idTipotarjeta) {
        this.idTipotarjeta = idTipotarjeta;
    }

    public TipoTarjeta(BigDecimal idTipotarjeta, String nombreTipotarjeta, double cupomax, double cupomin, char activo) {
        this.idTipotarjeta = idTipotarjeta;
        this.nombreTipotarjeta = nombreTipotarjeta;
        this.cupomax = cupomax;
        this.cupomin = cupomin;
        this.activo = activo;
    }

    public BigDecimal getIdTipotarjeta() {
        return idTipotarjeta;
    }

    public void setIdTipotarjeta(BigDecimal idTipotarjeta) {
        this.idTipotarjeta = idTipotarjeta;
    }

    public String getNombreTipotarjeta() {
        return nombreTipotarjeta;
    }

    public void setNombreTipotarjeta(String nombreTipotarjeta) {
        this.nombreTipotarjeta = nombreTipotarjeta;
    }

    public double getCupomax() {
        return cupomax;
    }

    public void setCupomax(double cupomax) {
        this.cupomax = cupomax;
    }

    public double getCupomin() {
        return cupomin;
    }

    public void setCupomin(double cupomin) {
        this.cupomin = cupomin;
    }

    public char getActivo() {
        return activo;
    }

    public void setActivo(char activo) {
        this.activo = activo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipotarjeta != null ? idTipotarjeta.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoTarjeta)) {
            return false;
        }
        TipoTarjeta other = (TipoTarjeta) object;
        if ((this.idTipotarjeta == null && other.idTipotarjeta != null) || (this.idTipotarjeta != null && !this.idTipotarjeta.equals(other.idTipotarjeta))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.TipoTarjeta[idTipotarjeta=" + idTipotarjeta + "]";
    }

}
